#include"define.h"



int main()
{
	__TcpServer = new tcpserver();
	__TcpServer->runServer(5);
	__AppPlayer = new AppPlayer();
	__TcpServer->registerCommand(1000, __AppPlayer);//login
	__TcpServer->registerCommand(2000, __AppPlayer);//move
	__TcpServer->registerCommand(3000, __AppPlayer);//getdate
	__TcpServer->registerCommand(7000, __AppPlayer);//attack
	__TcpServer->registerCommand(8000, __AppPlayer);//roll
	__TcpServer->registerCommand(6000, __AppPlayer);//send_all_date
	__TcpServer->registerCommand(9999, __AppPlayer);//safeconnect
	while (true)
	{
		if (__TcpServer == nullptr) return 0;
		__TcpServer->parseCommand();
		__AppPlayer->onUpdate();
		Sleep(5);
	}
	return 0;
}




